<template>
  <div class="app-container">

  <el-form ref="form" :model="student" label-width="120px">
      <el-form-item label="学号:">
        <el-input v-model="student.code" />
      </el-form-item>
      <el-form-item label="姓名:">
        <el-input v-model="student.name" />
      </el-form-item>
      <el-form-item label="性别:">
        <el-input v-model="student.gender" />
      </el-form-item>
     <el-form-item label="所属学院:">
        <el-input v-model="student.department" />
      </el-form-item>
      <el-form-item label="专业:">
        <el-input v-model="student.major" />
      </el-form-item>
      <el-form-item label="班级:">
        <el-input v-model="student.clazz" />
      </el-form-item>
      <el-form-item label="家庭住址:">
        <el-input v-model="student.address" />
      </el-form-item>
      <el-form-item label="电话号码:">
        <el-input v-model="student.tel" />
      </el-form-item>
      <el-form-item label="邮箱:">
        <el-input v-model="student.email" />
      </el-form-item>

      <el-form-item>
        <el-button type="primary" @click="onSubmit">确定</el-button>
        <el-button @click="onCancel">取消</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        student: {
          code: '',
          name: '',
          gender: '',
          department: '',
          major: '',
          clazz: '',
          address: '',
          tel: '',
          email: '',
        }
      }
    },
    methods: {
        onSubmit() {
          this.$message('submit!')
        },
        onCancel() {
          this.$message({
            message: 'cancel!',
            type: 'warning'
          })
        }
      }
    }
</script>

<style>
  .line {
    text-align: center;
  }
</style>
